
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type SmsRecordRequest struct {

	Uid string `json:"uid" form:"uid"`

	Phone string `json:"phone" form:"phone"`

	Content string `json:"content" form:"content"`

	AddTime string `json:"add_time" form:"add_time"`

	AddIp string `json:"add_ip" form:"add_ip"`

	Template string `json:"template" form:"template"`

	Resultcode string `json:"resultcode" form:"resultcode"`

	RecordId string `json:"record_id" form:"record_id"`

}

func (r *SmsRecordRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *SmsRecordRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"uid": "required",

		"phone": "required",

		"content": "required",

		"add_time": "required",

		"add_ip": "required",

		"template": "required",

		"resultcode": "required",

		"record_id": "required",

	}
}

func (r *SmsRecordRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SmsRecordRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SmsRecordRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
